package ms.unicorn.dsl.valueconverter;

import org.eclipse.xtext.common.services.DefaultTerminalConverters;
import org.eclipse.xtext.conversion.IValueConverter;
import org.eclipse.xtext.conversion.ValueConverter;

import com.google.inject.Inject;

public class SphynxValueConverterService extends DefaultTerminalConverters {
	@Inject
	private VERBATIM_STRINGValueConverter verbatimStringValueConverter;
	
	@Inject
	private BOOLEAN_CONSTANTSValueConverter booleanConstantValueConverter;
	
	@Inject
	private HEXValueConverter hexValueConverter;
	
	@Inject
	private FLOATValueConverter floatValueConverter;
	
	@ValueConverter(rule = "VERBATIM_STRING")
	public IValueConverter<String> VERBATIM_STRING() {
		return verbatimStringValueConverter;
	}
	
	@ValueConverter(rule = "BOOLEAN_CONSTANTS")
	public IValueConverter<Boolean> BOOLEAN_CONSTANTS() {
		return booleanConstantValueConverter;
	}
	
	@ValueConverter(rule = "HEX")
	public IValueConverter<Integer> HEX() {
		return hexValueConverter;
	}
	
	@ValueConverter(rule = "FLOAT")
	public IValueConverter<Float> FLOAT() {
		return floatValueConverter;
	}
}
